package com.dyw.Ba07;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @auther Devil
 * @create 2022-01-05-22:04
 */


@Component("Student04")
public class Student {
    @Value("${age}")
    private int age;
    @Value("${name}")
    private String name;


    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public Student() {
    }

    public Student(int age, String name) {
        this.age = age;
        this.name = name;

    }
}
